module.exports = {
    mode: "development",
    devtool: 'source-map',
    module:{
        rules:[
            {
                test:/\.(png|jpg|jpeg|gif)$/, // /\.(png)|(jpg)|(gif)$/
                use:[
                    {
                        loader:'./loader/loader-img.js',
                        options:{
                            limit: 3000, // 3000字节之上使用图片 以下使用base64
                            filename: "img/img-[contenthash:8].[ext]" //图片名称配置
                        }
                    }
                ]
            }
        ]
    }
}